﻿using RXY_Mall.Application.Order.Dto;
using RXY_Mall.Core;
using RXY_Mall.Domain;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RXY_Mall.Application.Order
{
    public interface IOrderService
    {
        #region 订单
        /// <summary>
        /// 快递公司列表
        /// </summary>
        /// <returns></returns>
        Response<IList<GetLogisticsOutput>> GetLogistics();

        Task<Response<GetOrderInfoOutput>> GetOrderInfo(int shop_id);

        /// <summary>
        /// 订单列表
        /// </summary>
        /// <param name="receiver_name">收货人</param>
        /// <param name="receiver_mobile">收货人手机</param>
        /// <param name="shop_name">店铺</param>
        /// <param name="order_no">订单号</param>
        /// <param name="start_date">开始时间</param>
        /// <param name="end_date">结束时间</param>
        /// <param name="order_status">订单状态</param>
        /// <param name="pay_status">支付状态</param>
        /// <param name="shipment_status">发货状态</param>
        /// <param name="pay_type">支付类型</param>
        /// <param name="page_index">页码</param>
        /// <param name="page_size">页数</param>
        /// <returns></returns>
        Response<IPagedList<GetOrdersOutput>> GetOrders(string receiver_name, string receiver_mobile, string shop_name, string order_no, string start_date, string end_date, int order_status, int pay_status, int shipment_status, int pay_type, string user_no, int page_index = 1, int page_size = 20, int shop_id = -1);

        /// <summary>
        /// 订单列表
        /// </summary>
        /// <param name="receiver_name">收货人</param>
        /// <param name="receiver_mobile">收货人手机</param>
        /// <param name="shop_name">店铺</param>
        /// <param name="order_no">订单号</param>
        /// <param name="start_date">开始时间</param>
        /// <param name="end_date">结束时间</param>
        /// <param name="order_status">订单状态</param>
        /// <param name="pay_status">支付状态</param>
        /// <param name="shipment_status">发货状态</param>
        /// <param name="pay_type">支付类型</param>
        /// <param name="page_index">页码</param>
        /// <param name="page_size">页数</param>
        /// <returns></returns>
        Response<string> ExportOrders(string receiver_name, string receiver_mobile, string shop_name, string order_no, string start_date, string end_date, int order_status, int pay_status, int shipment_status, int pay_type, string user_no, int shop_id = -1);

        /// <summary>
        /// 修改物流
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<Response<bool>> UpdateLogistics(UpdateLogisticsInput input);

        /// <summary>
        /// 订单详情
        /// </summary>
        /// <param name="order_id"></param>
        /// <returns></returns>
        Task<Response<GetOrderOutput>> GetOrder(int order_id, int shop_id = 0);
        #endregion

        #region 拼单
        /// <summary>
        /// 拼手气列表
        /// </summary>
        /// <param name="group_no">拼单号</param>
        /// <param name="start_date">开始时间</param>
        /// <param name="end_date">结束时间</param>
        /// <param name="group_status">拼单状态</param>
        /// <param name="page_index">页码</param>
        /// <param name="page_size">页数</param>
        /// <returns></returns>
        Response<IPagedList<GetOrderGroupsOutput>> GetOrderGroups(string group_no, string start_date, string end_date, int group_status, int page_index = 1, int page_size = 20, int shop_id = -1);

        /// <summary>
        /// 拼手气详情
        /// </summary>
        /// <param name="group_id"></param>
        /// <param name="shop_id"></param>
        /// <returns></returns>
        Task<Response<GetOrderGroupOutput>> GetOrderGroup(int group_id, int shop_id = 0);
        #endregion

        #region 免单
        /// <summary>
        /// 合体免单列表
        /// </summary>
        /// <param name="group_no">拼单ID</param>
        /// <param name="start_date">开始时间</param>
        /// <param name="end_date">结束时间</param>
        /// <param name="group_status">拼单状态</param>
        /// <param name="page_index">页码</param>
        /// <param name="page_size">页数</param>
        /// <returns></returns>
        Response<IPagedList<GetOrdeFreeGroupsOutput>> GetOrderFreeGroups(string group_no, string order_no, string start_date, string end_date, int group_status, int page_index = 1, int page_size = 20, int shop_id = -1);

        /// <summary>
        /// 合体免单详情
        /// </summary>
        /// <param name="group_id"></param>
        /// <returns></returns>
        Task<Response<GetOrderFreeGroupOutput>> GetOrderFreeGroup(int group_id, int shop_id = 0);
        #endregion

        #region 一元购
        /// <summary>
        /// 一元购列表
        /// </summary>
        /// <param name="group_no">拼单ID</param>
        /// <param name="start_date">开始时间</param>
        /// <param name="end_date">结束时间</param>
        /// <param name="group_status">拼单状态</param>
        /// <param name="page_index">页码</param>
        /// <param name="page_size">页数</param>
        /// <returns></returns>
        Response<IPagedList<GetOrdeFreeGroupsOutput>> GetOrderWelfareGroups(string group_no, string order_no, string start_date, string end_date, int group_status, int page_index = 1, int page_size = 20, int shop_id = -1);

        /// <summary>
        /// 一元购详情
        /// </summary>
        /// <param name="group_id"></param>
        /// <returns></returns>
        Task<Response<GetOrderFreeGroupOutput>> GetOrderWelfareGroup(int group_id, int shop_id = 0);
        #endregion

    }
}
